/*
 * MapView.cpp
 *
 *  Created on: 12.10.2013
 *      Author: dima
 */

#include "MapView.hpp"

#include <iostream>




Tanks::
View::
MapView::
MapView(Tanks::Model::MapModel * argMapModel,
    SDL_Surface * argScreen) :
      m_MapModel(argMapModel),
      m_screen(argScreen)
{}



void
Tanks::
View::
MapView::
Draw()
{
  std::map<Tanks::Model::GameObjectModel *, int>::iterator iter;
  for(iter = m_MapModel->Begin(); iter != m_MapModel->End(); ++iter)
  {
    SDL_BlitSurface(m_images[iter->second], NULL, m_screen, iter->first->GetRect());
  }
}



